<!DOCTYPE html>
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <title>留学生管理系统</title>  
        <link rel="stylesheet" href="${path}/css/admin2.css">
        <script>
            var _current_item = "#adminVisaManage";
        </script>
        <style>
        .p-div{
        border:1px solid #9A9A9A;
        width:550px;
        padding:40px;
        margin:auto;
        font-size:20px;
        }
        </style>
        <script type="text/javascript" src="${path}/js/jquery.min.js"></script>
    </head>
    <body>
        <!--header-->
        <div id="mask"></div>
        <div id="header"></div>
        <div id="main">
            <div id="side-menu"></div>
            <div id="container">
                <div id="inner-border">
                <div id="content_holder">
           
            <div id="ele2" >
                <div class="p-div">
                <button class="print-link no-print" onclick="ajaxVisa()"style="width:60px;float:right;margin-top:-20px">
               		 打印
                </button>
                <p style="text-align:center">国际生签证办理联系单</p>
                <div>兹有学生 <label class="stuName"></label>，护照号码：<label class="passNo"></label>，请为其出具以下类型的签证材料：</div>
                <p class="visa">□有效期6个月    □有效期1学年      √限期离境材料</p>
                <p style="text-align:right">经办老师签名: &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</p>
                <p style="text-align:right">计算机与信息工程学院(盖章)</p>
                <p style="text-align:right"id="date1"></p><br />
                <hr /><br />
                <p style="text-align:center">国际生签证办理联系单</p>
                <div>兹有学生 <label class="stuName"></label>，护照号码：<label class="passNo"></label>，请为其出具以下类型的签证材料：</div>
                <p class="visa">□有效期6个月    □有效期1学年      √限期离境材料</p>
                <p style="text-align:right">经办老师签名: &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</p>
                <p style="text-align:right">计算机与信息工程学院(盖章)</p>
                <p style="text-align:right"id="date2"></p>
                </div>
              
            </div>
        </div>
            </div>
            <div id="footer"></div>
        </div>
        
        </div>
        
        <script type="text/javascript" src="${path}/js/admin-main-appearance.js"></script>
        <script src="${path}/js/amazeui.min.js"></script>
		<script src="${path}/js/jQuery.print.js"></script>
        <script src="${path}/js/amazeui.min.js"></script>
        <script src="${path}/js/global.js"></script>
    <script type='text/javascript'>
    	$(document).ready(function () {
    	var now = new Date();
    	var year = now.getFullYear();       //年
        var month = now.getMonth() + 1;     //月
        var day = now.getDate();  
        var date = year + "年" + month + "月" + day +"日" ; 
        $("#date1").html(date + '&nbsp;&nbsp;');
        $("#date2").html(date + '&nbsp;&nbsp;');
        var newpassNo =  getCookie("newpassNo");
        var stuName =  getCookie("stuName");
        var visa =  getCookie("visa");
        $(".stuName").html(stuName);
        $(".passNo").html(newpassNo);
        if(visa=="1"){
        $(".visa").html("√有效期6个月    □有效期1学年      □限期离境材料");
        }else if(visa=="2"){
        $(".visa").html("□有效期6个月    √有效期1学年      □限期离境材料");
        }
       /*  
        $.ajax({
                    type:"post",
                    url:'${path}/adminVisaManage/stuVisaHtml',
                    dataType: "json",
                    success:function(data){
                     alert(data);
         
                    }
                }); */
    	})
    	
    	 function ajaxVisa(){
	 	//var visa = getRadioValue("visaTime");
	 	//var passNo = $("#passNo").attr("passNo");
	 	var passNo =  getCookie("passNo");
	 	 var visa =  getCookie("visa");
	 	$.ajax({
                    type:"post",
                    url:'${path}/adminVisaManage/saveVisa',
                    dataType: "json",
                    data:{
                    		visaTime:visa,
                    		passportNo:passNo,
                    },
                    datatype:"json",
                    success:function(data){
                      // alert(JSON.stringify(data));
                       
                      
                    }
                });

	 	} 
    
        //<![CDATA[
        $(function() {
        	
            $("#ele2").find('.print-link').on('click', function() {
                //Print ele2 with default options
                $.print("#ele2");
            }); 
        });
        //]]>
    </script>
        
    </body>
</html>
